
package com.victor9ac.tfm.twitter;

import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;


@Path("app")
public class TwitterEndpoint {
    
	TwitterService twitterService = TwitterService.getInstance();
	
	
	
    /** Method processing HTTP GET requests, producing "text/plain" MIME media
     * type.
     * @return String that will be send back as a response of type "text/plain".
     */
    @GET
    @Path("/tweet/{key}")
    @Produces(MediaType.APPLICATION_JSON)
    public Object getIt(@PathParam("key") String keyword) {
    	return twitterService.getCommentariesTweets(keyword);
    }
}
